package com.ruoyi.project.lesson.order.domain;

import com.ruoyi.common.utils.MoneyUtil;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.Date;

/**
 * 课程订单对象 lesson_order
 *
 * @author shixiangwen
 * @date 2020-12-07
 */
public class LessonOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * null
     */
    private Long id;

    /**
     * 应用ID
     */
    @Excel(name = "应用ID")
    private String appId;

    /**
     * kkid
     */
    @Excel(name = "kkid")
    private Long kkid;

    /**
     * 课程ID
     */
    @Excel(name = "课程ID")
    private Long lessonId;

    /**
     * 订单金额(分)
     */
    @Excel(name = "订单金额(分)")
    private Long fee;

    /**
     * 订单状态
     */
    @Excel(name = "订单状态")
    private Integer status;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /**
     * 支付时间
     */
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /**
     * 订单号
     */
    @Excel(name = "订单号")
    private String orderNo;

    /**
     * 支付订单号
     */
    @Excel(name = "支付订单号")
    private String payOrderNo;

    private String yuan;

    private String lessonName;

    private String contact;
    private String phone;

    /**
     * IP
     */
    @Excel(name = "IP")
    private String ip;

    private String ipInfo;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getAppId() {
        return appId;
    }

    public void setKkid(Long kkid) {
        this.kkid = kkid;
    }

    public Long getKkid() {
        return kkid;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setFee(Long fee) {
        this.fee = fee;
    }

    public Long getFee() {
        return fee;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setPayOrderNo(String payOrderNo) {
        this.payOrderNo = payOrderNo;
    }

    public String getPayOrderNo() {
        return payOrderNo;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getIp() {
        return ip;
    }

    public String getYuan() {
        return MoneyUtil.fee2yuan(fee).toString();
    }

    public void setYuan(String yuan) {
        this.yuan = yuan;
    }

    public String getLessonName() {
        return lessonName;
    }

    public void setLessonName(String lessonName) {
        this.lessonName = lessonName;
    }

    public String getIpInfo() {
        return ipInfo;
    }

    public void setIpInfo(String ipInfo) {
        this.ipInfo = ipInfo;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("appId", getAppId())
                .append("kkid", getKkid())
                .append("lessonId", getLessonId())
                .append("fee", getFee())
                .append("status", getStatus())
                .append("createdTime", getCreatedTime())
                .append("payTime", getPayTime())
                .append("orderNo", getOrderNo())
                .append("payOrderNo", getPayOrderNo())
                .append("ip", getIp())
                .toString();
    }
}
